package com.example.Wisdompark.service;

import com.example.Wisdompark.dao.UserMapper;
import com.example.Wisdompark.dao.WarehouseMapper;
import com.example.Wisdompark.pojo.Warehouse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Repository
public class WarehouseServiceImpl implements WarehouseService{
    @Autowired
    private WarehouseMapper warehouseMapper;

    @Override
    public List<Warehouse> quaryAll() {
        return warehouseMapper.quaryAll();
    }

    @Override
    public List<String> quaryAllCargo() {
        return warehouseMapper.quaryAllCargo();
    }

    @Override
    public int updateWarehouse(Warehouse warehouse) {
        return warehouseMapper.updateWarehouse(warehouse);
    }

    @Override
    public int clearWarehouse(int place_id) {
        return  warehouseMapper.clearWarehouse(place_id);
    }

    @Override
    public Integer getFirstEmptyPlace() {
        return warehouseMapper.getFirstEmptyPlace();
    }
}
